export const schema = {
    "type": "page",
    "title": "黑名单",
    "body": {
        "type": "crud",
        "api": "/api/team/blacklist",
        "columnsTogglable": false,
        "showHeader": false,
        "columns": [
            {
                "name": "id",
                "label": "团队ID",
                "width": 50
            },
            {
                "name": "name",
                "label": "团队名称",
                "type": "tpl",
                "tpl": "<a data-link='/team/view/${id}'>${name}</a>"
            },
            {
                "name": "contact_name",
                "label": "联系人"
            },
            {
                "name": "contact_phone",
                "label": "联系电话"
            },
            {
                "label": "地址",
                "type": "tpl",
                "tpl": "${province_name} ${city_name} ${county_name} ${addr}"
            },

            {
                "name": "created_at",
                "label": "申请日期"
            },

            {
                "name": "blacked_at",
                "label": "拉黑日期"
            },

            {
                "label": "备注",
                "name": "black_reason"
            },

            {
                "label": "操作",
                "type": "operation",
                "width": 180,
                "buttons": [
                    {
                        "type": "button",
                        "size": "xs",
                        "level": "info",
                        "label": "查看",
                        "actionType": "link",
                        "link": "/team/view/${id}"
                    },

                    {
                        "visibleOn": "data.in_blacklist",
                        "type": "button",
                        "size": "xs",
                        "label": "移除黑名单",
                        "level": "success",
                        "confirmText": "确定要移除黑名单？",
                        "actionType": "ajax",
                        "api": "/api/team/unblack/$id"
                    }

                ]
            }
        ]
    }
};
